package com.mall.user.dto;

import com.mall.commons.result.AbstractRequest;
import com.mall.commons.tool.exception.ValidateException;
import com.mall.user.constants.SysRetCodeConstants;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.StringUtils;

/**
 * @program: project3-group12
 * @description:
 * @author: YuHui
 * @create: 2021-08-26 10:19
 **/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class UserGetLoginRequest extends AbstractRequest {
    String userinfo;

    @Override
    public void requestCheck() {
        if(StringUtils.isBlank(userinfo)){
            throw new ValidateException(
                    SysRetCodeConstants.REQUEST_CHECK_FAILURE.getCode(),
                    SysRetCodeConstants.REQUEST_CHECK_FAILURE.getMessage()
            );
        }
    }
}
